package com.feri.fs.provider.controller;

import com.feri.fs.provider.entity.UserProject;
import com.feri.fs.provider.service.intf.UserProjectService;
import common.bo.UserProjectBo;
import common.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName UserProjectController
 * @Description TODO
 * @Author xing
 * @Date 2021/11/9 11:26
 * @Version 1.0
 */
@RestController
@RequestMapping("/provider/userproject/")
public class UserProjectController {
    @Autowired
    private UserProjectService service;
    //新增
    @PostMapping("createsrc")
    public R save(@RequestBody UserProjectBo entity){
        return service.save(entity);
    }
    //查询详情
    @GetMapping("detail")
    public R queryDetail(@RequestParam int id){
        return service.queryById(id);
    }
    //查询详情
    @GetMapping("page")
    public R queryPage(@RequestParam int page,@RequestParam int size){
        return service.queryPage(page, size);
    }

    @GetMapping("srcdetail")
    public R detail(@RequestParam int id){
        return service.queryDetail(id);
    }
}
